home *** CD-ROM | disk | FTP | other *** search
- property spr
- property cinza, branco, verde, anima
- property lastAnima
- property sequencia
-
- on beginSprite me
- set spr to the spriteNum of me
- set the visibility of sprite spr to false
- set the visibility of sprite spr+1 to false
- set the visibility of sprite spr+2 to false
- set the visibility of sprite spr+3 to false
- set branco = 0
- set verde = 0
- set cinza = 0
- set anima = 0
- set sequencia = [1, 2, 3, 4, 3, 2]
- end
-
- on clicaVerde me
- if verde <> 0 then
- setBranco me, verde
- updateStage
- end if
- end
-
- on cleanSprite me
- repeat with i = spr to spr + 3
- puppetSprite i, false
- set the visibility of sprite i to true
- end repeat
- end
-
- on setPaginas me, n
- if n > 4 then set n = 4
- if n < 0 then set n = 0
- set cinza = n
- if n = 0 then
- set the visibility of sprite spr to false
- set the visibility of sprite spr+1 to false
- set the visibility of sprite spr+2 to false
- set the visibility of sprite spr+3 to false
- else
- puppetSprite spr, true
- set mem = the number of member "Veja nro.Cinza"
- set the member of sprite spr to member (mem + n - 1)
- set the visibility of sprite spr to true
- set the visibility of sprite spr+1 to false
- set the visibility of sprite spr+2 to false
- set verde = 0
- set branco = 0
- set anima = 0
- set lastAnima = the timer
- end if
- end
-
- on setBranco me, n
- set mem = the number of member "Veja nro.Branco"
- puppetSprite spr+2, true
- set the member of sprite spr+2 to member (mem + n - 1)
- set the visibility of sprite spr+2 to true
-
- fazVejaMais n
- end
-
- on idleSprite me
- if cinza > 0 and (rollOver(spr) or rollOver(56)) then
- set n = (the mouseV - 406) / 13
- if n < 0 then set n = 0
- if n > 3 then
- set n = 3
- end if
- set n = n + 1
- if n > cinza then set n = 0
- -- put the mouseV & " # " & n
- else
- set n = 0
- end if
- if n <> verde then
- set verde = n
- if verde = 0 then
- set the visibility of sprite spr+1 to false
- else
- puppetSprite spr+1,true
- set mem = the number of member "Veja nro.Verde"
- set the member of sprite spr+1 to member (mem + verde - 1)
- set the visibility of sprite spr+1 to true
- end if
- end if
-
- -- Animacao
- if cinza > 0 then
- if the timer > lastAnima + 30 then
- set anima = anima + 1
- if anima > 6 then set anima = 1
- set mem = the number of member "Veja anima"
- puppetSprite spr+3, true
- set the member of sprite spr +3 to member (mem + getAt(sequencia,anima) - 1)
- set the visibility of sprite (spr+3) to true
- global gMustUpdate
- set gMustUpdate = true
- set lastAnima = the timer
- end if
- end if
- end